<template>
	<view class="page-content">
		
		<view class="submit-box">
			<image src="../static/icons/submitted-1.png" class="icon-submit" style=""></image>
			<text class="done-text">面试完毕，请等待结果通知！</text>
      <!-- 倒计时文本 -->
      <view v-if="countdown > 0" class="countdown-text">
        将在 {{ countdown }} 秒后跳转...
      </view>
		</view>
		
		<view class="say-something-block">
			<view class="say-something-box" style="margin-top: 4px;">
				<text class="more-text">本App为项目演示的体验版</text>
			</view>

			
			<view class="smill-box">
				<image src="../static/icons/smill.png" class="smill" style=""></image>
			</view>
		</view>
		
	</view>
</template>

<script>
	var app = getApp();
	export default {
		data() {
			return {
				env: app.getAppEnv(),
        countdown: 5, // 倒计时时间（秒）
			}
		},
		onShow() {
      this.startCountdown();
		},
		onLoad() {
		},
		methods:{
      startCountdown() {
        let timer = setInterval(() => {
          this.countdown--;
          if (this.countdown <= 0) {
            clearInterval(timer);
            uni.redirectTo({
              url: '/pages/welcome',
              success: () => {
                console.log('跳转成功');
              },
              fail: (err) => {
                console.error('跳转失败', err);
              }
            });
          }
        }, 1000);
      }
		}
	}
</script>

<style>
	@import url("me.css");
</style>
